package com.itheima.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.itheima.dao.PermissionDao;
import com.itheima.pojo.Permission;
import com.itheima.service.PermissionService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class PermissionServiceImpl implements PermissionService {

    @Autowired
    private PermissionDao permissionDao;

    //    查询所有权限列表
    @Override
    public List<Permission> findAll() {

        return permissionDao.findAll();
    }

    /**
     * 根据角色id查询权限列表
     * @param id
     * @return
     */
    @Override
    public List<Integer> findPermissionIds(Integer id) {
        return permissionDao.findPermissionIds(id);
    }
}
